/*
 * To change this template, choose Tools | Templates and open the template in
 * the editor.
 */
package SteamEngineFX.Layouts;

import SteamEngineDB.ScheduleRun;
import java.util.ArrayList;
import java.util.List;
import javafx.geometry.Pos;
import javafx.scene.control.Label;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane;
import javafx.scene.layout.VBox;
import javafx.scene.shape.Rectangle;

/**
 *
 * @author jbendixsen
 */
public class WorkAreaPane extends VBox{
    
    //private VBox outerPane = null;
    private HBox equipmentRow = null;
    //private List<VBox> equipmentItems = new ArrayList<VBox>();

    public WorkAreaPane() {
        
        getStyleClass().add("WorkAreaPane");
        
        equipmentRow = new HBox();
        equipmentRow.setPrefHeight(Double.MAX_VALUE);
        equipmentRow.setPrefWidth(Double.MAX_VALUE);
        equipmentRow.getStyleClass().add("equipmentRow");
        for (int i = 0; i < 5; i++){
            AnchorPane tempBox = new AnchorPane();
            tempBox.getStyleClass().add("WorkTemCarBox");
            tempBox.setPrefWidth(Double.MAX_VALUE);
            tempBox.setPrefHeight(Double.MAX_VALUE);
            Label boxLabel = new Label("Equipment Box");
            boxLabel.setAlignment(Pos.CENTER);
            boxLabel.setPrefWidth(Double.MAX_VALUE);
            tempBox.getChildren().add(boxLabel);
            tempBox.setTopAnchor(boxLabel, Double.valueOf(5));
            equipmentRow.getChildren().add(tempBox);
        }
        
        Label topText = new Label("Work Area Pane");
        
        Pane topRect = new Pane();
        topRect.getStyleClass().add("WorkTopRect");
        topRect.getChildren().add(topText);
        
        Label botText = new Label("Bottom of work area pane");
        
        Pane botRect = new Pane();
        botRect.getStyleClass().add("WorkBotRect");
        botRect.getChildren().add(botText);
        
        getChildren().addAll(equipmentRow);
        //getChildren().addAll(topRect, equipmentRow, botRect);
        //getChildren().addAll(topRect, botRect);
        
//        setTopAnchor(topRect, Double.valueOf(5));
//        setRightAnchor(topRect, Double.valueOf(5));
//        setLeftAnchor(topRect, Double.valueOf(5));
//        
//        setRightAnchor(equipmentRow, Double.valueOf(5));
//        setLeftAnchor(equipmentRow, Double.valueOf(5));
//        
//        setRightAnchor(botRect, Double.valueOf(5));
//        setLeftAnchor(botRect, Double.valueOf(5));
//        setBottomAnchor(botRect, Double.valueOf(5));
    }
    
    public void loadRun(ScheduleRun run){
        //
        
        
    }
    
}
